from django.db import models


class CustomManager(models.Manager):
    def bulk_create(self, objs, **kwargs):
        from django.db.models.signals import post_save
        for obj in objs:
            # 批量创建触发信号
            post_save.send(obj.__class__, instance=obj, created=True)
        return super().bulk_create(objs, **kwargs)
